Skip to content

Add graph mode debugging hints and troubleshooting doc#39

Merged
u-simha merged 6 commits into
apple:mainfrom
u-simha:u/usimha/update-graph-mode-error
Jul 16, 2026
Merged

Add graph mode debugging hints and troubleshooting doc#39
u-simha merged 6 commits into
apple:mainfrom
u-simha:u/usimha/update-graph-mode-error

Conversation

@u-simha

@u-simha u-simha commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
  • Add graph mode debugging hints to expose all the options we provide in prepare() as part of the error message
  • Add export_with_strict flag which sets strict=True / False in torch.export.export
  • Add the module name when throwing error in the get_partitions.. function - to help with debugging by skipping that layer
  • Add a documentation page which captures some of the common guidelines for debugging graph mode failures

Preview: https://u-simha.github.io/coreai-optimization

Utkarsh Simha and others added 4 commits July 10, 2026 15:24
Surfaces actionable hints (export_with_no_grad toggle, dynamic_shapes,
eager fallback) in the torch.export.export failure message, and
includes the source module name when a graph partition annotation
fails so it can be excluded via module_name_configs. Adds a Graph
Mode Troubleshooting doc under a new Debugging doc section.
The link still pointed at the old utils/ location after this branch
moved the doc to debugging/.
Link "Graph execution mode" to the execution-modes section, note that
export failures may warrant fixing the model definition (since the
same construct can block coreai-torch conversion later), and drop the
"our"/"report against torch" phrasing per review.
@u-simha
u-simha requested a review from aseemw July 15, 2026 01:25
u-simha added 2 commits July 16, 2026 13:16
…tils

torch.export's insert_deferred_runtime_asserts synthesizes one SymInt
mul per shape-runtime assertion under a shared torch_fn tag, collapsing
several into a single SourcePartition. The new strict "exactly 1 call
function node" check treated this as an error, regressing
test_prepare_with_symint_mul_partition_collision (and CI). These
SymInt nodes carry no tensor value to annotate, so picking any one of
them is safe, matching the pre-existing lenient behavior for this case.
@u-simha
u-simha merged commit d1e5d37 into apple:main Jul 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants